import request from '@/utils/request'
import type { LoginForm, LoginInfoData, UserInfoData } from './type'
enum API{
  LOGIN_URL='/admin/acl/index/login',
  USERINFO_URL='/admin/acl/index/info',
  LOGOUT_URL='/admin/acl/index/logout'
}
export const login = (data: LoginForm) => request<any,LoginInfoData>({
  url: API.LOGIN_URL,
  method: 'post',
  data
})

export const getUserInfo = () => request<any,UserInfoData>({
  url: API.USERINFO_URL,
  method: 'get'
})
export const logout = () => request<any,any>({
  url: API.LOGOUT_URL,
  method: 'post'
})
